# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kmplot
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="http://edu.kde.org/kmplot"
pkgdesc="Mathematical Function Plotter"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtsvg-dev kcrash-dev kguiaddons-dev ki18n-dev kparts-dev kwidgetsaddons-dev kdoctools-dev kdbusaddons-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/kmplot-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="06cb19924e6d460b52f419d29e028ab4cb13cab6ab14f1a27216d3d0ecd467676d337ec04d2c3fcc2b081853d3e0858ce2f2cc46279efc8fe692b8ab6a4ee5ff  kmplot-20.04.3.tar.xz"
